#coding:utf-8

from django.http import HttpResponse
from django.views.generic import View

class Index(View):
    
    def get(self, request, name, age):

        print(dir(request))

        return HttpResponse('I am {0}, age is {1}'.format(name, age))

# def index(request, name, age):

#     # get 中第一个值是获取的key，第二个值置空，则指无默认值
#     # name = request.GET.get('name','')
#     # age = request.GET.get('age', 0)

#     return HttpResponse('I am {0}, age is {1}'.format(name,age))